<template>
    <button @click="isShowDemo = !isShowDemo">切换状态：显示/隐藏</button>
    <LifeDemo v-if="isShowDemo" />
</template>

<script lang="ts">
import { ref } from 'vue'
import LifeDemo from './components/lifeDemo.vue'

export default {
    name: 'vue3Life',
    components: { LifeDemo },
    setup() {
        let isShowDemo = ref(true)

        return { isShowDemo }
    }
} 
</script>
<style></style>